Correctly restore original Isearch point. (Bug#4994)
authorJuri Linkov <juri@jurta.org>
Mon, 7 Dec 2009 17:30:01 +0000 (17:30 +0000)
committerJuri Linkov <juri@jurta.org>
Mon, 7 Dec 2009 17:30:01 +0000 (17:30 +0000)
commit81f60c1cf95a793f245db5f40ee3ab298d5a17c6
tree16c35f0503664f32e94c5c126e5a0f6e3af7972c
parentd4366ffc9b2eb384d87c6a9fc4903a84cc31adfb
Correctly restore original Isearch point.  (Bug#4994)

* isearch.el (isearch-mode): Move `isearch-push-state' after
`(run-hooks 'isearch-mode-hook)'.
(isearch-cancel): When `isearch-push-state-function' is defined,
let-bind `isearch-cmds' to the first state (the last element of
`isearch-cmds') and call `isearch-top-state' (it calls pop-state
function and restores the original point).  Otherwise, move point
to `isearch-opoint'.
lisp/ChangeLog
lisp/isearch.el